home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / CALib & You… / Source / CASample / CAS_Dialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-07  |  3.6 KB  |  100 lines  |  [TEXT/MPS ]

  1. /*
  2.  
  3.     File:        CAS_Dialog.h
  4.  
  5.     Contains:    Header for utility routines for dialogs & controls.
  6.  
  7.     Written by:    David H Nelson
  8.  
  9.     Copyright © 1988-1995 ComponentWorks, All rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.          <1>     2/14/95    SJF        first checked in
  14.          <1>     1988        DHN        Created.
  15. */
  16.  
  17. #if !defined(_H_dialogTools)
  18. #define _H_dialogTools
  19.  
  20.  
  21. #define bGDF bGenericDialogFilter
  22.  
  23. typedef struct popupPrivateData {
  24.     MenuHandle mHandle; /* the popup menu handle */
  25.     short mID;          /* the popup menu ID */
  26.     /* after these two public fields is the mPrivate private data, */
  27.     /* which may be any old size and should not be messed with */
  28. }
  29. popupPrivateData, *popupPrivateDataPtr,**popupPrivateDataHdl;
  30.  
  31.  
  32. #if defined(__cplusplus)
  33. extern "C"
  34. {
  35. #endif
  36.  
  37. /*--------------------------------------------------------------------------*/
  38. /* DialogTools.c */
  39.  
  40.  
  41. void        Dialog_CenterALRT(                short ID);
  42. void        Dialog_CenterALRTonFrontWindow(    short ID);
  43. void        Dialog_CenterDLOG(                short ID);
  44. void        Dialog_CenterDLOGonFrontWindow(    short ID);
  45. Point        Dialog_TopLeftCenteredDLOG(        short iDLOG);
  46.  
  47. void        Dialog_SetBoldButton(    DialogPtr theDialog,short itemNum,short RefID);
  48. void        Dialog_SetCheckBox(        DialogPtr theDialog, short checkItem, Boolean bCheckValue);
  49. Boolean        Dialog_GetCheckBox(        DialogPtr theDialog, short checkItem);
  50. void        Dialog_ToggleCheckBox(    DialogPtr theDialog, short checkItem);
  51. void        Dialog_SetRadioGroup(    DialogPtr theDialog, short startItem, short endItem, short activeItem);
  52. short        Dialog_GetRadioGroup(    DialogPtr theDialog, short startItem, short endItem);
  53. Handle        Dialog_GetItemHandle(    DialogPtr theDialog, short itemNum);
  54. void        Dialog_SetItemHandle(    DialogPtr theDialog, short itemNum,Handle theHandle);
  55. void        Dialog_GetItemRect(        DialogPtr theDialog, short theID,Rect *theRect);
  56. void        Dialog_SetItemRect(        DialogPtr theDialog, short theID,Rect *theRect);
  57. short        Dialog_GetItemKind(        DialogPtr theDialog, short theID);
  58. void        Dialog_InvalItemRect(    DialogPtr theDialog, short itemNum);
  59. void        Dialog_FrameItem(        WindowPtr theWindow, short itemNum);
  60. void        Dialog_GrayLine(        WindowPtr theWindow, short itemNum);
  61. void        Dialog_SizeTextItem(    DialogPtr theDialog, short itemNum);
  62. void        Dialog_SetTextItem(        DialogPtr theDialog, short itemNum,StringPtr string);
  63. short        Dialog_GetIconID(        DialogPtr theDialog, short itemNum);
  64. void        Dialog_DrawCenteredStr(    WindowPtr theWindow, short itemNum, StringPtr theString);
  65. void        Dialog_OutlineButton(    WindowPtr theWindow, short itemNum);
  66. void        Dialog_SetUserProc(DialogPtr theDialog,short itemNum,pascal void (*proc)(WindowPtr theWindow,short itemNum));
  67. void        Dialog_RedrawDialogs(void);
  68.  
  69. Boolean        Dialog_ControlEnabled(ControlHandle theControl);
  70.  
  71. void        Dialog_BlinkControl(ControlHandle theControl);
  72.  
  73. MenuHandle    GetPopUpMenuHandle(ControlHandle thisControl);
  74. void        SetPopUpMenuHandle(ControlHandle thisControl, MenuHandle theMenu);
  75. short        ItemStringToItem(Str255 theItemString, MenuHandle theMenu);
  76. short        FontToMenuItem(short fontFamilyNumber, MenuHandle theMenu);
  77. short        SizeToMenuItem(short theSize, MenuHandle theMenu);
  78.  
  79.  
  80. pascal Boolean bGenericDialogFilter(DialogPtr theDialog,EventRecord *theEvent,short *itemHit);
  81. Boolean bDialogFilter(DialogPtr theDialog,EventRecord *theEvent,short *itemHit,
  82.     Boolean (*filterProc)(DialogPtr,EventRecord *,short *));
  83.  
  84.  
  85. // These were unused
  86.  
  87. //pascal void pOutlineButton(WindowPtr theWindow,short itemNum);
  88. //pascal void pFrameItem(WindowPtr theWindow,short itemNum);
  89. //pascal void pGrayLine(WindowPtr theWindow,short itemNum);
  90. //pascal void pSizeTextItem(DialogPtr theDialog,short itemNum);
  91. //pascal void pSetTextItem(DialogPtr theDialog,short itemNum,StringPtr string);
  92.  
  93.  
  94. #if defined(__cplusplus)
  95. }
  96. #endif
  97.  
  98.  
  99. #endif
  100.